
// 五分钟间隔
// 当前年份
export function getCurrentYear() {
  return new Date().getFullYear();
}
// 前后五年
export function getYears(currentYear) {
  const years = [];
  for (let i = currentYear - 5; i <= currentYear + 5; i++) {
    years.push(i);
  }
  return years;
}

export function getMonths() {
  const months = [];
  for (let i = 1; i <= 12; i++) {
    months.push(i);
  }
  return months;
}

export function getDays(month, year = getCurrentYear()) {
  const days = [];
  const maxDay = new Date(year, month, 0).getDate();
  for (let i = 1; i <= maxDay; i++) {
    days.push(i);
  }
  return days;
}

export function getHours() {
  const hours = [];
  for (let i = 0; i < 24; i++) {
    hours.push(i);
  }
  return hours;
}

export function getMinutes() {
  const minutes = [];
  for (let i = 0; i < 60; i += 5) { // 每5分钟一个间隔
    minutes.push(i);
  }
  return minutes;
}